Let \(x=(x_1, \ldots, x_n)\) be the realizations of the r.v. \(X = (X_1, \ldots, X_n)\) where the \(X_i\), \(i=1, \ldots, n\), are independent and identically distributed according to \(\mathcal{N}(\mu, \sigma^2)\). To obtain a confidence interval for the mean \(\mu\) when \(\sigma^2\) is known, we leverage the pivotal quantity: \[ T(\mu)=\frac{\overline X - \mu}{\sigma/\sqrt{n}} \sim \mathcal{N}(0,1), \quad \forall \mu \in \mathbb{R}, \sigma^2 > 0.\]
Then, it follows that for \(0<\alpha <1\) \[\rm{Pr}(-z_{1-\alpha/2} \leq T(\mu) \leq z_{1-{\alpha/2}})=1-\alpha \] and a confidence interval of level \(1-\alpha\) for \(\mu\) is given by \[\text{CI}^{(1-\alpha)}_\mu=\bigg(\bar x - z_{1-\alpha/2} \frac{\sigma}{\sqrt{n}}, \bar x + z_{1-\alpha/2} \frac{\sigma}{\sqrt{n}}\bigg)\] where \(-z_{1-\alpha/2}=z_{\alpha/2}\) and \(z_{1-\alpha/2}\) represent the quantiles of order \(\alpha/2\) and \(1-\alpha/2\) of a standard normal distribution, respectively.